import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import './libs'

// import ElementUI from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css'
// 初始化样式引入
import './style/base.less'

/*
 测试
 // import axios1 from '../src/utils/axios'
 // import axios2 from '../src/utils/axios2'
 // import Mock from 'mockjs'
 // axios2.get('/usedcar/province?dtype=&key=87a45a3338231d5a614a14cb35611159').then(res => {
 //   console.log(res)
 // })
 // axios1.get('/service/getIpInfo.php?ip=63.223.108.42').then(res => {
 //   console.log(res)
 // })

 // Mock.mock(/\/mock34/, 'get', { code: 20000, data: { name: 'xiao' } })

*/

import components from './components/index'
import './icons'

// import './assets/icon/iconfont.css'
// import './assets/icon/iconfont.js'
// import '//at.alicdn.com/t/font_1429401_vwfghsyoen.js'

import BaiduMap from 'vue-baidu-map'
// import { mockXHR } from '../mock'

/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online! ! !
 */
// if (process.env.NODE_ENV === 'production') {
//   mockXHR()
// }
// main.js 开启mock 服务
import { mockXHR } from '../mock'
Vue.use(BaiduMap, {
  ak: '5qOlRG5LXn2xbzMOfO8QTVoRplcD522a'
})
if (process.env.NODE_ENV === 'development') {
  mockXHR()
}

Vue.use(components)
// Vue.use(ElementUI)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
